package com.gxa.user.recycling.service.impl;


import com.gxa.core.recycling.pojo.Admin;
import com.gxa.core.recycling.pojo.ServiceAddress;
import com.gxa.core.recycling.service.impl.BaseServiceImpl;
import com.gxa.user.recycling.mapper.ServiceAddressMapper;
import com.gxa.user.recycling.service.AdminService;
import com.gxa.user.recycling.service.ServiceAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @Author xhy
 * @Date 2021/12/2 10:22
 */
@Service("serviceAddressService")
@Transactional(rollbackFor = {Throwable.class})
public class ServiceAddressServiceImpl extends BaseServiceImpl<ServiceAddress> implements ServiceAddressService {

    @Resource
    private ServiceAddressMapper serviceAddressMapper;

    @Override
    public List<Map> findAddress(Long id) {
        return serviceAddressMapper.findAddress(id);
    }

    @Override
    public List<ServiceAddress> findByCommunityId(Long CommunityId) {
        List<ServiceAddress> serviceAddress = serviceAddressMapper.findByCommunityId(CommunityId);
        return serviceAddress;
    }

    @Override
    public ServiceAddress selectByAddressGetId(String daddress) {
        ServiceAddress serviceAddress = serviceAddressMapper.selectByAddressGetId(daddress);
        return serviceAddress;
    }
}


